<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/9/27 0027
 * Time: 16:15
 */

namespace App\Repositories\Contracts;

use App\Repositories\Criteria\Criteria;

interface CriteriaInterface
{
    /**
     * 设置忽略条件
     * @param bool $status
     * @return $this
     */
    public function skipCriteria($status = true);

    /**
     * 获取条件
     * @return mixed
     */
    public function getCriteria();

    /**
     * 添加where条件
     * @param Criteria $criteria
     * @return $this
     */
    public function getByCriteria(Criteria $criteria);

    /**
     * 附加条件
     * @param Criteria $criteria
     * @return $this
     */
    public function pushCriteria(Criteria $criteria);

    /**
     * 执行添加所有条件
     * @return $this
     */
    public function  applyCriteria();
}